package br.com.future.securityContext;

import javax.servlet.http.HttpServletRequest;

import br.com.future.constants.Headers;

public class SecurityContextUtils {

	public static SecurityContext getSecurityContextFromRequest(HttpServletRequest request) {
		return (SecurityContext) request.getAttribute(Headers.HEADER_SECUTIRY_CONTEXT);
	}

	public static void setSecurityContextToRequest(HttpServletRequest request, SecurityContext sc) {
		request.setAttribute(Headers.HEADER_SECUTIRY_CONTEXT, sc);
	}
}
